package org.cttic.visualization.visualization.z_service;

import org.cttic.visualization.visualization.common.EsDataIncomplete;
import org.cttic.visualization.visualization.common.EsDataStrip;
import org.cttic.visualization.visualization.common.lwzx_infoData;
import org.cttic.visualization.visualization.common.mongoData;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author shkstart
 * @create 2020-05-07 9:51
 */
@Repository
public interface EmployeeRepository extends ElasticsearchRepository<EsDataStrip,String> {

    List<EsDataStrip> findByVehicleNoAndVehicleColor(String vehicleNo,String vehicleColor);
    //查询行程编号
    List<EsDataStrip> findByVehicleNoAndVehicleColorAndTravelId(String vehicleNo,String vehicleColor,String travelId);
    List<EsDataIncomplete>findByVehicleNoAndTravelId(String vehicleNo,String travelId);
    //查询时间段
    List<EsDataStrip> findByVehicleNoAndVehicleColorAndTansTimeBetween(String vehicleNo,String vehicleColor,String tansTime1,String tansTime2);
    List<EsDataIncomplete> findByVehicleNoAndTansTimeBetweenAndVehicleColor(String vehicleNo, String tansTime1, String tansTime2, String vehicleColor);
    //查询时间点
    List<EsDataStrip> findByVehicleNoAndVehicleColorAndTansTimeAfter(String vehicleNo,String vehicleColor,String tansTime);

    List<mongoData> findByTansTimeIsBetween(String tansTime1, String tansTime2);
    List<EsDataStrip> queryByTansTimeIsBetweenAndCurareacodeBetween(String tansTime1, String tansTime2,int startCurareacode,int endCurareacode);
    List<EsDataIncomplete> getByTansTimeIsBetweenAndCurareacodeBetween(String tansTime1, String tansTime2,int startCurareacode,int endCurareacode);
    int countDistinctByTansTimeBetweenAndCurareacodeBetween(String tansTime1, String tansTime2,int startCurareacode,int endCurareacode);
//    List<EsDataStrip> queryFirstByVehicleNo(String vehicleNo);
//    List<EsDataStrip> findDistinctByTansTimeBetween(String tansTime1,String tansTime2);

//    List<EsDataStrip> queryDistinctByVehicleNo();
    int countByCurareacodeBetweenAndTansTimeBetween(int startCurareacode,int endCurareacode,String tansTime1, String tansTime2);


}
